package com.food.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.food.pojo.CaloriesIngestibleUser;
import com.food.pojo.CaloriesIngestibleUserDto;
import com.food.pojo.CaloriesRecordsUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface CaloriesIngestibleUserMapper extends BaseMapper<CaloriesIngestibleUser> {
    CaloriesIngestibleUserDto getUserRemainingCalories(Integer userId);

    Integer insertCaloriesIngestibleUser(CaloriesIngestibleUser caloriesIngestibleUser);

    Integer updateReduceCalorie(CaloriesRecordsUser caloriesRecordsUser);

    Integer updateByUserId(@Param("userId") Integer userId, @Param("addCalorieNew") Integer addCalorieNew);
}
